package pprz.light;

import java.awt.Container;
import java.awt.Dimension;
import java.awt.GridBagLayout;


public class LightPanel extends LightContainer
{
	static final long serialVersionUID=1;
	
	protected Container contentPane;
	
	public LightPanel()
	{
		contentPane=new Container();
		GridBagLayout layout=new GridBagLayout();
		contentPane.setLayout(layout);
		contentPane.setLocation(0,0);
		add(contentPane);	
	}

	public Container getContentPane() {return contentPane;}
	
	@Override
	public void validate() {	
		//contentPane.validate();
		Dimension size=contentPane.getLayout().preferredLayoutSize(contentPane);
		
		contentPane.setSize(size);
		contentPane.setPreferredSize(size);
		this.setPreferredSize(size);
		this.setSize(size);
		System.out.println("validate--LightPanel");
		System.out.println(size);
		super.validate();	
	}
	

	
	
	
}

